Contract and settlement expressions

All group keywords (non-history) include lines on the current settlement or contract.

All .History keywords include only the settlements on the current contract.

All the keywords listed below produce numbers, so expressions can use arithmetic operators between keywords as is illustrated in many of the examples which follow.

Keyword Explanation Example
.Date The date on a contract line or settlement line IF(.Date > #01/01/2018#, 1, .75)
#Date# A literal date #01/15/2018#
"string" Text or string. "ABC"
.Minutes Minutes on the contract or settlement line .Minutes * .Price
.Hours Hours on the contract line .Hours * .Price
.Quantity Quantity on the contract or settlement line .Quantity * .Price
.Price Price on the contract or settlement line .Quantity/1.0825 * .Price
.Amount Amount on the contract or settlement line

Note

.Amount is for use in credit expressions only!

.Amount * .25
.Discount Discount on the settlement line

Note

.Discount is for use in credit expressions only!

((.Quantity * .Price) - .Discount) * .15
.Credit Credit on the settlement line

Note

.Credit is for use in amount expressions only!

(.Quantity * .Price) - .Credit
group.Minutes(begin,end) The total minutes of all products on the contract or settlement which are assigned to group. The begin and end date parameters are optional and independent of each other. Staff.Minutes * .Price
group.Hours(begin,end) The total hours of all products on the contract or settlement which are assigned to group. The begin and end date parameters are optional and independent of each other. Security.Hours * .Price
group.Quantity(begin,end) The total quantity of all products on the contract or settlement which are assigned to group. The begin and end date parameters are optional and independent of each other. IF(Ticket.Quantity > 1200, Ticket.Quantity * .Price * .75, Ticket.Quantity * .Price)
group.Discount(begin,end) The total discount on all products on the settlement which are assigned to group. The begin and end date parameters are optional and independent of each other. (.Quantity * .Price) - Rent.Discount
group.Amount(begin,end) The total amount of all products on the contract or settlement which are assigned to group. The begin and end date parameters are optional and independent of each other. IF(Comm.Amount ≥ 4000, .Quantity * .Price * .15, 0)
group.Credit(begin,end) The total credit amount of all products on the settlement which are assigned to group. The begin and end date parameters are optional and independent of each other. MAX(0,Rent.Amount.History + Rent.Amount - Comm.Credit.History - Comm.Credit)
group.Count(begin,end) The number of settlement lines for products assigned to group. The begin and end date parameters are optional and independent of each other. IF(Comm.Count = 12, - Park.Amount, 0)
group.Minutes.History(begin,end) The total minutes for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other. Security.Minutes.History(, DATE(.Date("yesterday")) * .Price
group.Hours.History(begin,end) The total hours for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other. Security.Hours.History(, DATE(.Date("yesterday")) * .Price
group.Quantity.History(begin,end) The total quantity for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other. MAX(0, Comm.Quantity.History(, .Date) + Comm.Quantity(, .Date) + .Quantity) - 350000
group.Amount.History(begin,end) The total amount for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other. MIN(.Amount, Rent.Amount.History + Rent.Amount - Comm.Credit.History(, .Date) - Comm.Credit(, .Date))
group.Discount.History(begin,end) The total discount amount for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other.  
group.Credit.History(begin,end) The total credit amount for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other. MIN(.Amount,Rent.Amount.History + Rent.Amount - Comm.Credit.History(, .Date) - Comm.Credit(, .Date))
group.Count.History(begin,end) The total number of all settlement lines for the contract for all products assigned to group. The begin and end date parameters are optional and independent of each other.  

† The following syntax is allowed for the begin and end date parameters of a group function:

Syntax Sample Explanation
group.amount No date range
group.amount() No date range
group.amount(,) No date range
group.amount(begin) Begin date only
group.amount(begin,) Begin date only
group.amount(,end) End date only
group.amount(begin,end) Both begin and end date